package com.young.jdbc.datasource;

import java.util.Date;

/**
 * @Author: young
 * @Date: 2021-12-03 21:10
 * @Description: Student对象和student表的基类对应
 */
public class Student { //Javabean, POJO, Domain对象
	private Integer id;
	private String name;
	private String sex;
	private Date birthday;
	private String phone;
	
	public Student(){ //一定要给一个无参构造器（反射需要）
	
	}
	
	public Student(Integer id, String name, String sex, Date birthday, String phone) {
		this.id = id;
		this.name = name;
		this.sex = sex;
		this.birthday = birthday;
		this.phone = phone;
	}
	
	public Integer getId() {
		return id;
	}
	
	public void setId(Integer id) {
		this.id = id;
	}
	
	public String getName() {
		return name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	public String getSex() {
		return sex;
	}
	
	public void setSex(String sex) {
		this.sex = sex;
	}
	
	public Date getBirthday() {
		return birthday;
	}
	
	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}
	
	public String getPhone() {
		return phone;
	}
	
	public void setPhone(String phone) {
		this.phone = phone;
	}
	
	@Override
	public String toString() {
		return "\nStudent{" +
				"id=" + id +
				", name='" + name + '\'' +
				", sex='" + sex + '\'' +
				", birthday=" + birthday +
				", phone='" + phone + '\'' +
				'}';
	}
}
